<template>
  <!-- 活动弹窗 -->
  <van-popup v-model="maskShow" closeable @close="onClose">
    <view class="festival">
      <view class="photo">
        <img
          @click="toProduct"
          mode="widthFix"
          :src="$imgUrl + 'static/product-huodong_1666849955401.png'"
        />
      </view>
    </view>
  </van-popup>
</template>

<script>
export default {
  name: "festival",
  components: {},
  props: {},
  data() {
    return {
      maskShow: false
    };
  },
  mounted() {
    // let nowTime = new Date().getTime();
    // let dialogTime = uni.getStorageSync("dialogTime");
    // console.log("dialogTime", 1111, dialogTime, 322222, nowTime);

    // if (dialogTime !== null && dialogTime < nowTime) {
    //   this.maskShow = true;
    //   uni.removeStorage("dialogTime");
    //   let time = new Date().getTime() + 60 * 60 * 1000 * 24 * 3;
    //   uni.setStorageSync("dialogTime", String(time));
    // } else if (dialogTime == null) {
    //   this.maskShow = true;
    //   let time = new Date().getTime() + 60 * 60 * 1000 * 24 * 3;
    //   uni.setStorageSync("dialogTime", String(time));
    // }
  },
  methods: {
    //商品列表
    toProduct() {
      this.maskShow = false;
      uni.navigateTo({
        url: "/pages/product/productList/Index"
      });
    },
    onClose() {
      this.maskShow = false;
    }
  }
};
</script>

<style scoped lang="less">
.festival {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  .photo {
    width: 600rpx;
    // height: 400rpx;
    img {
      // width: 500rpx;
      width: 600rpx;
      // margin: 0 auto;
      // height: 400rpx;
      margin-left: 20rpx;
      // margin-right: 28rpx;
    }
  }
  .see-btn {
    margin-top: 20rpx;
    padding: 10rpx 50rpx;
    border-radius: 50rpx;
    color: #ffffff;
    font-size: 26rpx;
    background: linear-gradient(90deg, #1678ff, #3c2890);
  }
}
.van-popup {
  background: rgba(255, 255, 255, 0);
}
</style>
